# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: coderobe <coderobe@archlinux.org>
# Contibutor: Pierre Neidhardt <ambrevar@gmail.com>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Byron Clark <byron@theclarkfamily.name>

pkgname=udiskie
pkgver=2.4.2
pkgrel=2
pkgdesc="Removable disk automounter using udisks"
arch=("any")
url="https://pypi.python.org/pypi/udiskie"
license=("MIT")
depends=("udisks2" "python" "python-gobject" "python-yaml" "python-docopt" "gtk3" "libnotify" "python-keyutils")
makedepends=("asciidoc" "python-setuptools")
optdepends=("libappindicator-gtk3: --appindicator support")
source=("$pkgname-$pkgver.tar.gz::https://codeload.github.com/coldfix/$pkgname/tar.gz/v$pkgver")
sha256sums=('b1341f124f3397e6d64cc619e456b8362e5951055622e05667cc58bc46bdd9b4')

build(){
	cd "$pkgname-$pkgver"
	python setup.py build
	make -C doc
}

package() {
	cd "$pkgname-$pkgver"

	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
	install -m 0644 -D "doc/$pkgname.8" "$pkgdir/usr/share/man/man8/$pkgname.8"
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -dm755 "$pkgdir/usr/share/zsh/site-functions"
	install -m644 completions/zsh/* "$pkgdir/usr/share/zsh/site-functions"
}
